package cn.edu.kzjsxy.graduationproject.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户表：用于存储系统用户信息
 * </p>
 *
 * @author chén jiā jùn
 * @since 2024-04-14
 */
@Data
@Builder
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("users")
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="Users对象", description="用户表：用于存储系统用户信息")
public class Users implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户ID，唯一标识用户")
    @TableId(value = "user_id", type = IdType.ASSIGN_UUID)
    private String userId;

    @ApiModelProperty(value = "密码，用于用户登录验证")
    @TableField("password")
    private String password;

    @ApiModelProperty(value = "性别:男 女")
    @TableField("gender")
    private String gender;

    @ApiModelProperty(value = "系部")
    @TableField("department")
    private String department;

    @ApiModelProperty(value = "班级")
    @TableField("class")
    private String clbum;

    @ApiModelProperty(value = "姓名")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "头像")
    @TableField("avatar_url")
    private String avatarUrl;

    @ApiModelProperty(value = "角色  0是宿管  1是学生 3是管理员 ")
    @TableField("role")
    private String role;

    @ApiModelProperty(value = "联系方式")
    @TableField("contact_info")
    private String contactInfo;

    @ApiModelProperty(value = "邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty(value = "是否锁定 T 是锁定 F 不锁定")
    @TableField("is_locked")
    private Boolean isLocked;

    @ApiModelProperty(value = "创建时间")
    @TableField("created_at")
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "token")
    @TableField(exist = false)
    private String token;
}
